package com.wsoft.oss.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wsoft.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * <p>
 * 
 * </p>
 *
 * @author z001
 * @since 2024年09月26日 15:17:53
 */
@Getter
@Setter
@TableName("oss_file")
@Schema(name = "OssFileEntity", description = "")
@Accessors(chain = true)
public class OssFileEntity extends BaseEntity {

    @Schema(description = "唯一标识")
    @TableField("uuid")
    private Long uuid;

    @Schema(description = "文件类型")
    @TableField("file_type")
    private String fileType;

    @Schema(description = "文件后缀")
    @TableField("file_suffix")
    private String fileSuffix;

    @Schema(description = "存储方式(local/minio)")
    @TableField("storage_type")
    private String storageType;

    @Schema(description = "桶")
    @TableField("bucket_name")
    private String bucketName;

    @Schema(description = "文件名")
    @TableField("name")
    private String name;

    @Schema(description = "文件大小(kb)")
    @TableField("size")
    private BigDecimal size;

    @Schema(description = "原始文件路径")
    @TableField("url")
    private String url;

    @Schema(description = "图片时小图路径")
    @TableField("min_url")
    private String minUrl;

    @Schema(description = "图片时中图路径")
    @TableField("mid_url")
    private String midUrl;

    @Schema(description = "图片时大图路径")
    @TableField("max_url")
    private String maxUrl;

    @Schema(description = "关联表")
    @TableField("table_name")
    private String tableName;

    @Schema(description = "关联字段")
    @TableField("table_field")
    private String tableField;

    @Schema(description = "文件md5值")
    @TableField("md5")
    private String md5;
}
